package cn.easy.mapper;

import cn.easy.pojo.User;
import cn.easy.pojo.UserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PathVariable;

public interface UserMapper {
    int countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer userId);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByLoginName(String loginName);

    List<User> selectByNickName(String nickName);

    User selectByUserKey(String userkey);

    /**
     * 用户登录
     * @param userLoginName
     * @param userPassword
     * @return
     */
    User login(@Param("userLoginName") String userLoginName,@Param("userPassword") String userPassword);
}